﻿using Microsoft.AspNetCore.Mvc;
using 项目备忘录.Models;

namespace 项目备忘录.Controllers
{
    public class AddController : Controller
    {
        public IActionResult Index()
        {
            return View();
        }
        [HttpPost]
        public IActionResult addProject(Project project)
        {
            project.id = Project.projects.Count()+1;
            Project.projects.Add(project);
            return RedirectToAction("Index","Home");
        }
    }
}
